package sg.tua.hud;

import org.newdawn.slick.Animation;
import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.geom.Rectangle;
import org.newdawn.slick.geom.Vector2f;
import org.newdawn.slick.geom.Shape;


public class HudAnimationFactory {
 public static HudAnimation create(String name, String string, Vector2f position) throws SlickException{
	 Image[] image = {new Image(string)};
	 Rectangle imageShape = new Rectangle(position.x, position.y,(float)image[0].getWidth(),(float)image[0].getHeight());
	 return new HudAnimation(name,position,new Animation(image,1),imageShape,0);
 }
}
